Skip to content

Instantly share code, notes, and snippets.

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@mcxiaoke
mcxiaoke / miui-blotware-apps.md
Last active November 27, 2026 02:08
MIUI 13/14 bloatware apps, updated at 20240816

对于所有应用,不建议直接删除,使用adb shell pm disable-user package-name禁用即可,方便出问题时恢复。

DO NOT UNINSTALL:

  • com.miui.securitycenter
  • com.miui.securityadd
  • com.xiaomi.finddevice

(Don’t uninstall these three apps or services from your Xiaomi device. Otherwise, you may encounter device bricking or bootloop issues.)

@Tapanhaz
Tapanhaz / download_file.rs
Created November 7, 2023 14:46 — forked from giuliano-macedo/download_file.rs
Download large files in rust with progress bar using reqwest, future_util and indicatif
// you need this in your cargo.toml
// reqwest = { version = "0.11.3", features = ["stream"] }
// futures-util = "0.3.14"
// indicatif = "0.15.0"
use std::cmp::min;
use std::fs::File;
use std::io::Write;
use reqwest::Client;
use indicatif::{ProgressBar, ProgressStyle};
@19h
19h / prompt.md
Created November 26, 2026 02:26
RE analysis prompt

You are an elite reverse-engineering and binary-analysis system. Your task is to analyze an IDA-derived pseudocode dump and determine, with extreme rigor, exactly what the associated binary is, what it does, why it exists, how it executes, what it depends on, how it communicates with other components, and what effects it can have on its host and environment.

Your standard of work is exhaustive, evidence-driven, adversarial, and reproducible. Treat the assignment as a full software-architecture reconstruction, not as a superficial malware verdict, API-name listing, or summary of conspicuous strings.

Your primary objective is to reconstruct a technically accurate specification of the binary from imperfect static evidence.

1. Core principles

  1. Evidence outranks intuition.
  • Never infer a binary’s purpose merely from its filename, a few API calls, familiar strings, imports, or the apparent theme of the surrounding files.
@unrays
unrays / shifted_similarity.cpp
Last active November 27, 2026 02:06
Experimental SIMD-Based String Similarity Algorithm in C++20 Using AVX2 and AVX-512 Masked Loads
// Copyright (c) November 2026 Félix-Olivier Dumas. All rights reserved.
// Licensed under the terms described in the LICENSE file
#include <immintrin.h>
#include <bit>
#include <cstddef>
#include <cstdint>
#include <new>
#include <string>
@rohitg00
rohitg00 / llm-wiki.md
Last active November 27, 2026 02:02 — forked from karpathy/llm-wiki.md
LLM Wiki v2 — extending Karpathy's LLM Wiki pattern with lessons from building agentmemory

LLM Wiki v2

A pattern for building personal knowledge bases using LLMs. Extended with lessons from building agentmemory 20K+ Stars ⭐️, a persistent memory engine for AI coding agents.

This builds on Andrej Karpathy's original LLM Wiki idea file. Everything in the original still applies. This document adds what we learned running the pattern in production: what breaks at scale, what's missing, and what separates a wiki that stays useful from one that rots.

What the original gets right

The core insight is correct: stop re-deriving, start compiling. RAG retrieves and forgets. A wiki accumulates and compounds. The three-layer architecture (raw sources, wiki, schema) works. The operations (ingest, query, lint) cover the basics. If you haven't read the original, start there.

name explain-diff-html
description Use when the user asks for a rich explanation of a code change, diff, branch, or PR. Produces HTML output.

Explain Diff

Please make me a rich, interactive explanation of the specified code change.

It should have these sections:

@mcxiaoke
mcxiaoke / HyperOS3_Debloat_Guide.md
Last active November 27, 2026 01:58
xiaomihyperos system 小米 HyperOS 通用 ADB 精简与去广告/遥测命令清单(全量含说明)

小米 HyperOS 通用 ADB 精简与去广告/遥测命令清单(全量含说明)

适用机型:小米 / Redmi 全系(运行 HyperOS 1.0 / 2.0 / 3.0,Android 14 / 15 / 16)
核心机制:在 HyperOS 系统中,系统应用受系统级保护已无法使用 disable-user,统一使用用户级安全卸载命令 pm uninstall -k --user 0。该卸载仅作用于当前用户空间,底层 ROM 原包保持完整,随时可通过命令秒级恢复。


目录

  1. 使用前必读与恢复指南
  2. 【红线禁区】绝对不能卸载的组件(防卡米/崩溃)